import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/index.vue'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  redirect: '/login'
},
{
  path: '/home',
  name: 'home',
  component: Home,
  children: [{
    path: '/bank-financing/show',
    name: 'bank-financing-show',
    component: () => import('@/views/bank-financing/show/index.vue')
  }, {
    path: '/bank-financing/manage',
    name: 'bank-financing-manage',
    component: () => import('@/views/bank-financing/manage/index.vue')
  },
  {
    path: '/area',
    name: 'area',
    component: () => import('@/views/area-manage/index.vue')
  }, {
    path: '/abroad',
    name: 'abroad',
    component: () => import('@/views/abroad/index.vue')
  }, {
    path: '/bank_financing-org',
    name: 'bank-financing-org',
    component: () => import('@/views/bank-financing/org/index.vue')
  }, {
    path: '/first-loan-manage',
    name: 'first-loan-manage',
    component: () => import('@/views/first-loan/manage/index.vue')
  }, {
    path: '/first-loan-chart',
    name: 'first-loan-chart',
    component: () => import('@/views/first-loan/chart/index.vue')
  }, {
    path: '/first-loan-table',
    name: 'first-loan-table',
    component: () => import('@/views/first-loan/table/index.vue')
  }, {
    path: '/first-loan-org-category',
    name: 'first-loan-org-category',
    component: () => import('@/views/first-loan-org-category/index.vue')
  }, {
    path: '/first-loan-base',
    name: 'first-loan-base',
    component: () => import('@/views/first-loan/base/index.vue')
  }, {
    path: '/first-loan',
    name: 'first-loan',
    component: () => import('@/views/first-loan/first-loan/index.vue')
  }, {
    path: '/first-loan-result',
    name: 'first-loan-result',
    component: () => import('@/views/first-loan/first-loan-result/index.vue')
  }, {
    path: '/score-manage',
    name: 'score-manage',
    component: () => import('@/views/score/manage/index.vue')
  }, {
    path: '/score-model',
    name: 'score-model',
    component: () => import('@/views/score/model/index.vue')
  }, {
    path: '/score-org',
    name: 'score-org',
    component: () => import('@/views/score/org/index.vue')
  }, {
    path: '/score-model-org/:id',
    name: 'score-model-org',
    component: () => import('@/views/score/model-org/index.vue')
  }, {
    path: '/score-model-item/:id',
    name: 'score-model-item',
    component: () => import('@/views/score/model-item/index.vue')
  }, {
    path: '/score-task-org/:id',
    name: 'score-task-org',
    component: () => import('@/views/score/task-org/index.vue')
  }, {
    path: '/score-mark/:id',
    name: 'score-mark',
    component: () => import('@/views/score/mark/index.vue')
  }, {
    path: '/first-loan-guarantee',
    name: 'first-loan-guarantee',
    component: () => import('@/views/first-loan/guarantee/index.vue')
  }
  ]
},
{
  path: '/login',
  name: 'Login',
  component: () => import('@/views/login/index.vue')
}
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router